﻿using System;

namespace JSH.ITDiplom.OOPC01.PersonalIdentityNumber.BusinessLayer
{
    /// <summary>
    /// Date validation for Danish and Swedish personal identity numbers.
    /// </summary>
    public class DateValidation : IPersonalIdentityNumberValidation
    {
        private readonly DateTime? birthDay;

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="birthDay">Birthday</param>
        public DateValidation(DateTime? birthDay)
        {
            this.birthDay = birthDay;    
        }

        /// <summary>
        /// Validate.
        /// </summary>
        /// <returns>Returns true if personal identity number is valid</returns>
        public bool Validate()
        {
            if (birthDay == null) return false;
            return true;
        }
    }
}